package com.springday2annotate.service.impl;

import com.springday2annotate.dao.BookDao;
import com.springday2annotate.service.BookService;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Service
public class BookServiceImpl implements BookService {
    @Autowired
    @Qualifier("bookDao3")
    private BookDao bookDao;

    @Override
    public void save() {
        System.out.println("book service save ...");
        bookDao.save();
    }

//    public void setBookDao(BookDao bookDao) {
//        this.bookDao = bookDao;
//    }

//    @PostConstruct
//    public void init(){
//        System.out.println("book service init ...");
//    }
//
//    @PreDestroy
//    public void destroy(){
//        System.out.println("book service destroy ...");
//    }
}
